from openpyxl import load_workbook
from openpyxl.styles import Font
wb=load_workbook("D://Test.xlsx")
ws=wb.active

ws.merge_cells("A1:G1")
ws.row_dimensions[1].heigh=40
ws.column_dimensions["A"].width=4
ws.column_dimensions["b"].width=11
ws.column_dimensions["c"].width=30

ws["A1"].font=Font(name="黑体",size=18,bold=True)

wb.save("D://111.xlsx")